<?php

abstract class Transformer extends CActiveRecord{




	public static function jsonToModel($mseArray)
	{
		switch($mseArray["class"]){
			case (MSELoginDTO::$CLASS):
				//MSELoginDTO
				$model = new MSELoginDTO;
				$model->toModel($mseArray);
				break;
			case (LoginForm::$CLASS):
				//LoginForm
				$model = new LoginForm;
				$model->toModel($mseArray);
				break;
			case (User::$CLASS):
				//LoginForm
				$model = new User;
				$model->toModel($mseArray);
				break;
		}
		return $model;
	}

}